<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>订单预警工作台</title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="http://cdn.amazeui.org/amazeui/2.7.0/css/amazeui.min.css">
    <link rel="stylesheet" href="http://cdn.amazeui.org/amazeui/2.7.0/css/app.css">
    <link rel="stylesheet" href="http://cdn.amazeui.org/amazeui/2.7.0/css/admin.css">
</head>
<body style="overflow: scroll">
<!-- Header -->

<ul class="am-list am-list-border  am-list-static " id="show_warn_list">
    <volist name="data" id="vo">
        <li>
            {$vo.pr}<span class="am-badge">{$vo.trigger_time}</span>
            <a href="{:U('show_order_info?order_id='.$vo['order_id'])}">{$vo.order_sn}  </a>
        </li>
    </volist>
</ul>
<button type="button" id="ShowMore" class="am-btn am-btn-default am-btn-block" onclick="next_page()">加载更多</button>
<script>
    var page = 2;
    function next_page() {

        $("button#ShowMore").html("加载中<i class='am-icon-spinner am-icon-spin' id='load_icon'></i>");

        $.get('{:U("show_warn_list")}', {'page': page}, function (data) {
            if(data=='null'){
                $("button#ShowMore").text("就这么多了");
                $("button#ShowMore").addClass('am-disabled');
            }else{
                page++;
                //alert(data);
                $("ul#show_warn_list").append(data);
                $("button#ShowMore").text("加载更多");
            }
        });
    }
</script>
<script src="https://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
<script src="http://cdn.amazeui.org/amazeui/2.7.2/js/amazeui.min.js"></script>
</body>
</html>
